package com.ims.pojo;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @author: zk
 * @date: 2022/9/1 12:42
 * 用于 SpringSecurity
 */
public class UserDetail extends User {

    private com.ims.pojo.User userEntity;

    public UserDetail(com.ims.pojo.User userEntity, Collection<? extends GrantedAuthority> authorities) {
        super(userEntity.getUsername(), userEntity.getPassword(), authorities);
        this.userEntity = userEntity;
    }
}
